<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div {
            width: 300px;
            height: 300px;
            padding: 10px;
            border: 2px solid green;
            position: relative;
            /*CSS3的内容*/
            resize: both;
            overflow: auto;
            /*
                resize           设置元素的大小可以拖动改变
                必须配合overflow: auto;使用
            */
        }

        div a {
            text-decoration: none;
            width: 100px;
            height: 100px;
            color: #ffffff;
            background: green;
            font: 20px/100px "微软雅黑";
            position: absolute;
            text-align: center;
        }

        .a1 {
            left: 10px;
            top: 10px;
        }

        .a2 {
            right: 10px;
            top: 10px;
        }

        .a3 {
            /*left: 50%;*/
            /*top: 50%;*/
            /*margin-top: -50px;*/
            /*margin-left: -50px;*/
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            margin: auto;
        }

        .a4 {
            right: 10px;
            bottom: 10px;
        }

        .a5 {
            left: 10px;
            bottom: 10px;
        }
    </style>
</head>
<body>
<div>
    <a href="#" class="a1">a1</a>
    <a href="#" class="a2">a2</a>
    <a href="#" class="a3">a3</a>
    <a href="#" class="a4">a4</a>
    <a href="#" class="a5">a5</a>
</div>
</body>
</html>